﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MyControl {

  #region 选中项发生变化_回调函数
  /// <summary>
  /// 选中项发生变化_回调函数
  /// </summary>
  /// <param name="item">变化的内容</param>
  #endregion
  public delegate void SelectValueChangeHandler(object sender, SelectValueChangeEventArgs e);

  #region 选中内容发生变化事件参数
  /// <summary>
  /// 选中内容发生变化事件参数
  /// </summary>
  #endregion
  public class SelectValueChangeEventArgs : EventArgs {

	#region 旧的选中项
	/// <summary>
	/// 旧的选中项
	/// </summary>
	#endregion
	private Tree oldSelectItem;

	#region 当前的选中项
	/// <summary>
	/// 当前的选中项
	/// </summary>
	#endregion
	private Tree selectItem;

	#region 旧的选中项
	/// <summary>
	/// 旧的选中项
	/// </summary>
	#endregion
	public Tree OldSelectItem {
	  get {
		return this.oldSelectItem;
	  }
	}

	#region 当前的选中项
	/// <summary>
	/// 当前的选中项
	/// </summary>
	#endregion
	public Tree SelectItem {
	  get {
		return this.selectItem;
	  }
	}

	#region 旧的选中内容
	/// <summary>
	/// 旧的选中内容
	/// </summary>
	#endregion
	private object oldSelectValue;

	#region 当前的选中内容
	/// <summary>
	/// 当前的选中内容
	/// </summary>
	#endregion
	private object selectValue;

	#region 旧的选中内容
	/// <summary>
	/// 旧的选中内容
	/// </summary>
	#endregion
	public object OldSelectValue {
	  get {
		return this.oldSelectValue;
	  }
	}

	#region 当前的选中内容
	/// <summary>
	/// 当前的选中内容
	/// </summary>
	#endregion
	public object SelectValue {
	  get {
		return this.selectValue;
	  }
	}

	#region 创建选中内容发生变化事件参数
	/// <summary>
	/// 创建选中内容发生变化事件参数
	/// </summary>
	/// <param name="selectItem">当前的选中内容</param>
	/// <param name="oldSelectItem">旧选中内容</param>
	#endregion
	public SelectValueChangeEventArgs(object selectValue, object oldSelectValue, Tree selectItem, Tree oldSelectItem) {
	  this.selectValue = selectValue;
	  this.oldSelectValue = oldSelectValue;
	  this.selectItem = selectItem;
	  this.oldSelectItem = oldSelectItem;
	}
  }
}
